package com.ce.pms.occupation.model;

// Generated 2008-12-24 13:41:51 by Hibernate Tools 3.2.0.b9

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.ce.pms.common.model.HmEmployeeDomain;
import com.sitechasia.webx.core.model.IDomainObject;

/**
 * 实体名称: 物品移交 关联数据表:OM_THING_HANDOVER
 *
 * @author yandawei
 * @CreateDate:2008-12-24
 */
@Entity
@Table(name = "OM_THING_HANDOVER")
public class ThingHandoverDO implements IDomainObject {

	/**
	 * 主键
	 */
	@Id
	@GeneratedValue
	@Column(name = "THING_HANDOVER_ID", unique = true, nullable = false)
	private Long keyword;

	/**
	 * 身份验证DO
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "IDENTITY_VALIDATE_ID", nullable = false)
	private IdentityValidateDO identityValidate;

	/**
	 * 移交物品项目清单
	 */
	@OneToMany(fetch = FetchType.LAZY,mappedBy="thingHandover",cascade=CascadeType.ALL)
	Set<ThingHandoverItemDO> thingHandoverItems = new HashSet<ThingHandoverItemDO>();

	/**
	 * 移交人
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "EMPLOYEE_ID", nullable = false)
	private HmEmployeeDomain handoverMan;

	/**
	 * 接受人
	 */
	@Column(name = "ACCEPTER", nullable = false, length = 36)
	private String accepter;

	/**
	 * 移交日期
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "HANDOVER_DATE", nullable = false, length = 19)
	private Date handoverDate;

	/**
	 * 钥匙是否移交标志1 ： 是 0 ： 否
	 */
	@Column(name = "HANDOVER_YN", nullable = false, length = 1)
	private String handoverStatus;

	/**
	 * 描述说明
	 */
	@Column(name = "DESCRIPTION", length = 200)
	private String description;

	public ThingHandoverDO() {
	}

	public ThingHandoverDO(Long keyword) {
		super();
		this.keyword = keyword;
	}

	public HmEmployeeDomain getHandoverMan() {
		return handoverMan;
	}

	public void setHandoverMan(HmEmployeeDomain handoverMan) {
		this.handoverMan = handoverMan;
	}

	public IdentityValidateDO getIdentityValidate() {
		return identityValidate;
	}

	public void setIdentityValidate(IdentityValidateDO identityValidate) {
		this.identityValidate = identityValidate;
	}

	public Long getKeyword() {
		return keyword;
	}

	public void setKeyword(Long keyword) {
		this.keyword = keyword;
	}

	public String getAccepter() {
		return this.accepter;
	}

	public void setAccepter(String accepter) {
		this.accepter = accepter;
	}

	public Date getHandoverDate() {
		return this.handoverDate;
	}

	public void setHandoverDate(Date handoverDate) {
		this.handoverDate = handoverDate;
	}

	public String getHandoverStatus() {
		return this.handoverStatus;
	}

	public void setHandoverStatus(String handoverStatus) {
		this.handoverStatus = handoverStatus;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setThingHandoverItems(Set<ThingHandoverItemDO> thingHandoverItems)
	{
		this.thingHandoverItems = thingHandoverItems;
	}

	public Set<ThingHandoverItemDO> getThingHandoverItems()
	{
		return thingHandoverItems;
	}
}
